/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.view.grouping;

import java.awt.Graphics;
import org.jfonia.connect5.basics.MutableValueNode;
import org.jfonia.constants.ViewConstants;
import org.jfonia.view.panels.BasicNodePanel;

/**
 *
 * @author Rik Bauwens
 */
public abstract class AbstractGroup extends BasicNodePanel implements IGroup
{

        public AbstractGroup(MutableValueNode<Double> xNode, MutableValueNode<Double> yNode,
                             MutableValueNode<Double> widthNode, MutableValueNode<Double> heightNode)
        {
                super(xNode, yNode, widthNode, heightNode);
        }

        @Override
        public void paintComponent(Graphics g)
        {
                super.paintComponent(g);
                g.setColor(ViewConstants.GROUPINGBOX_COLOR);
                g.fillRoundRect(getX(), getY(), getWidth(), getHeight(),
                        ViewConstants.ROUNDRECT_ARC_WIDTH, ViewConstants.ROUNDRECT_ARC_HEIGHT);
        }

}
